package com.starryx.sim.mvc.config;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


@Component
@ConfigurationProperties(prefix = "net")
public class ServerConfig {

	/**
	 * 服务器 ip 地址
	 */
	private String ip = "127.0.0.1";

	/**
	 * 服务器端口
	 */
	private int port = 9527;

	/**
	 * 负责连接的 EventLoop 的线程数
	 */
	private short bossGroupThread = 2;

	/**
	 * 负责读写的 EventLoop 的线程数
	 */
	private short workerGroupThread = 4;

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public short getBossGroupThread() {
		return bossGroupThread;
	}

	public void setBossGroupThread(short bossGroupThread) {
		this.bossGroupThread = bossGroupThread;
	}

	public short getWorkerGroupThread() {
		return workerGroupThread;
	}

	public void setWorkerGroupThread(short workerGroupThreaad) {
		this.workerGroupThread = workerGroupThreaad;
	}

}
